package com.gt.mapper;

import com.github.pagehelper.Page;
import com.gt.pojo.dto.NoticePageQueryDTO;
import com.gt.pojo.entity.Notice;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface NoticeMapper {


    void add(Notice notice);

    Page<Notice> pageQuery(NoticePageQueryDTO noticePageQueryDTO);

    void deleteBatch(List<Long> ids);

    @Select("select *from library.notice where id = #{id}")
    Notice getById(Long id);

    void update(Notice notice);

    @Delete(("delete from library.notice where id = #{id}"))
    void deleteById(Long id);
}
